package com.itheima.map.mapdemo;

import java.util.HashMap;
import java.util.Map;

public class MyMap2 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();

        map.put("郭靖","黄蓉");
        map.put("杨过","小龙女");
        map.put("张无忌","周芷若");

        map.put("张无忌","赵敏");

        map.remove("杨过");

        map.containsKey("张无忌");
        map.containsKey("尹志平");

        map.containsValue("灭绝师太");

        System.out.println(map.size());

        System.out.println(map.isEmpty());

        map.clear();
        System.out.println(map.isEmpty());
        System.out.println(map);
    }
}
